<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2017/9/5
 * Time: 10:32
 */

if(!defined('IN_T')){
    die('hacking attempt');
}


class comment extends module_public_comment
{
    protected function get_cid()
    {
        global $tp;
        $cid = intval($_REQUEST['cid']);
        if($cid > 0){
            $tp->assign('cid',$cid);
        }
        return $cid;
    }

    protected function index()
    {
        global $Base;
        global $Db;
        global $tp;
        //读取所有商户,管理员查询
        $sql = "select id,name from ".$Base->table('company')." where p_id=0";
        $users = $Db->query($sql);
        $tp->assign('users',$users);
        parent::index();
    }

    protected function get_ncid()
    {
        global $tp;
        $ncid = intval($_REQUEST['ncid']);
        if($ncid > 0){
            $tp->assign('ncid',$ncid);
        }
        return $ncid;
    }
}
new comment();

?>